package com.zzj.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.zzj.bean.TabMsg;
import com.zzj.dao.TabMsgMapper;
import com.zzj.service.TabMsgService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * InnoDB free: 8192 kB 服务实现类
 * </p>
 *
 * @author 花
 * @since 2022-03-04
 */
@Service
public class TabMsgServiceImpl extends ServiceImpl<TabMsgMapper, TabMsg> implements TabMsgService {

    @Resource
    private TabMsgMapper msgMapper;

    @Override
    public PageInfo<TabMsg> getAllMsg(int pageNum, int pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        List<TabMsg> list = msgMapper.selectList(null);
        return new PageInfo<>(list);
    }
}
